package com.ahsjdy.st.stdao.mapper;

import com.ahsjdy.st.stdao.entity.Merchant;
import com.ahsjdy.st.stdao.entity.Rider;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RiderMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Rider record);

    int insertSelective(Rider record);

    Rider selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Rider record);

    int updateByPrimaryKey(Rider record);

    int updateStatus(@Param("riderId") Integer riderId,
                     @Param("oldStatus") Integer oldStatus,
                     @Param("newStatus") Integer newStatus);

    List<Rider> listRiders(@Param("realName")String realName,
                                @Param("status")Integer status,
                                @Param("phone")String phone,
                                @Param("offset")Integer offset,
                                @Param("pageSize")Integer pageSize);

    int countRiders(@Param("realName")String realName,
                      @Param("phone")String phone,
                      @Param("status")Integer status);
}